package fachklassen.entities;

import java.util.ArrayList;
import java.util.List;

public abstract class Whiteboard {
	private String name;
	private List<Beobachter>beobachter;
	
	public Whiteboard(String name) {
		this.beobachter = new ArrayList<Beobachter>();
		this.name = name;
	}

	public void informieren() {
		for (Beobachter b:beobachter) {
			b.aktualisieren(name);
		}
	}
	
	public void anmelden(Beobachter b) {
		beobachter.add(b);
	}
	
	public String getName() {
		return name;
	}
}
